package generic;

import Classroom.A0408.construction.People;

//泛型
public class Model<T> {
    private T s;

    public void setS(T s) {
        this.s = s;
    }

    public T getS() {
        return s;
    }
}

class Test{
    public static void main(String[] args) {
        Model<String> model = new Model<>();
        model.setS("aaaaa");
        System.out.println("model = " + model.getS());
        Model<Integer> model1 = new Model<>();
        model1.setS(15);
        Model<People> model2 = new Model<>();
        model2.setS(new People("jack",12));


    }
}
